﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace HDK.API.Syndication
{

    public interface ISyndicationFeed
    {
        IList<ISyndicationPerson> Authors { get; }
        IList<ISyndicationCategory> Categories { get; }
        IList<ISyndicationPerson> Contributors { get; }
        string Description { get; }
        IList<string> Images { get; }
        DateTimeOffset LastUpdatedTime { get; }
        string Link { get; }
        string Title { get; }
        string ImageUrl { get; set; }
        IList<ISyndicationPost> Posts { get; }
    }

    public interface ISyndicationPerson
    {
        // Summary:
        //     Gets or sets the email address of the person.
        //
        // Returns:
        //     The atom:email element.
        [DataMember()]
        string Email { get; set; }
        //
        // Summary:
        //     Gets or sets the name of the person.
        //
        // Returns:
        //     The atom:name element.
        [DataMember()]
        string Name { get; set; }
        //
        // Summary:
        //     Gets or sets the URI of the person.
        //
        // Returns:
        //     The atom:uri element. This property is the absolute resolved against the
        //     xml:base attribute, if it is present. If the href attribute is a relative
        //     string and there is no xml:base attribute, this property is NULL because
        //     the relative is not supported by the runtime class.
        [DataMember()]
        Uri Uri { get; set; }
    }

    [DataContract]
    public class SyndicationPersonBase : ISyndicationPerson
    {
        // Summary:
        //     Gets or sets the email address of the person.
        //
        // Returns:
        //     The atom:email element.
        [DataMember()]
        public string Email { get; set; }
        //
        // Summary:
        //     Gets or sets the name of the person.
        //
        // Returns:
        //     The atom:name element.
        [DataMember()]
        public string Name { get; set; }
        //
        // Summary:
        //     Gets or sets the URI of the person.
        //
        // Returns:
        //     The atom:uri element. This property is the absolute resolved against the
        //     xml:base attribute, if it is present. If the href attribute is a relative
        //     string and there is no xml:base attribute, this property is NULL because
        //     the relative is not supported by the runtime class.
        [DataMember()]
        public Uri Uri { get; set; }
    }

    public interface ISyndicationCategory
    {
        // Summary:
        //     Gets or sets the label for the category. This property represents the label
        //     attribute on atom:category. It provides a label for display in end-user applications.
        //
        // Returns:
        //     The label attribute on atom:category.
        [DataMember()]
        string Label { get; set; }
        //
        // Summary:
        //     Gets or sets a string that identifies the category. This property represents
        //     the required term attribute on atom:category or the text content of the category
        //     element in RSS 2.0.
        //
        // Returns:
        //     The required term attribute on atom:category or the text content of the category
        //     element in RSS 2.0.
        [DataMember()]
        string Term { get; set; }
    }

    [DataContract]
    public class SyndicationCategoryBase : ISyndicationCategory
    {
        // Summary:
        //     Gets or sets the label for the category. This property represents the label
        //     attribute on atom:category. It provides a label for display in end-user applications.
        //
        // Returns:
        //     The label attribute on atom:category.
        [DataMember()]
        public string Label { get; set; }
        //
        // Summary:
        //     Gets or sets a string that identifies the category. This property represents
        //     the required term attribute on atom:category or the text content of the category
        //     element in RSS 2.0.
        //
        // Returns:
        //     The required term attribute on atom:category or the text content of the category
        //     element in RSS 2.0.
        [DataMember()]
        public string Term { get; set; }
    }


}
